package goldendawn.footballalarm.entity;

import goldendawn.core.BaseEntity;

import java.text.SimpleDateFormat;
import java.util.Date;

import android.content.ContentValues;
	/***
	* Fixtures实体类型
	* @author 由GoldenDawn 实体类生成器生成
	* 2012-12-08 10-19-30
	*/
public class Fixtures extends BaseEntity {
	public static String ID="id";
	public static String HOME_TEAM="home_team";
	public static String AWAY_TEAM="away_team";
	public static String TIME="time";
	public static String TYPE="type";

	private int _id;
	private int _home_team;
	private int _away_team;
	private Date _time;
	private int _type;

	public void setId(int id) {
		this._id=id;
	}
	public int getId() {
		return _id;
	}

	public void setHome_team(int home_team) {
		this._home_team=home_team;
	}
	public int getHome_team() {
		return _home_team;
	}

	public void setAway_team(int away_team) {
		this._away_team=away_team;
	}
	public int getAway_team() {
		return _away_team;
	}

	public void setTime(Date time) {
		this._time=time;
	}
	public Date getTime() {
		return _time;
	}

	public void setType(int type) {
		this._type=type;
	}
	public int getType() {
		return _type;
	}

	@Override
	public String getPriKey() {
		return "id";
	}
	@Override
	public String getPriKeyValue() {
		return _id+"";
	}
	@Override
	public ContentValues getContentValues() {
		ContentValues values=new ContentValues();
		values.put("ID",_id);
		values.put("HOME_TEAM",_home_team);
		values.put("AWAY_TEAM",_away_team);
		SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		if(_time!=null){
			String tString = format.format(_time);
			values.put("time", tString);
		}
		values.put("TYPE",_type);
		return values;
	}
	}